<!--
/**
 * moOde audio player (C) 2014 Tim Curtis
 * http://moodeaudio.org
 *
 * This Program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3, or (at your option)
 * any later version.
 *
 * This Program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * 汉化：Androidnews
 */
-->
<div id="container">
<div class="container">
	<h1 class="sys-config">系统</h1>

	<form class="form-horizontal" method="post" enctype="multipart/form-data">
		<div class="control-group">
			<legend>软件更新</legend>
			<label class="control-label">通知</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio toggle-updater-auto-check" for="toggle-updater-auto-check-2">开</label>$_select[updater_auto_check_on]
					<label class="toggle-radio toggle-updater-auto-check" for="toggle-updater-auto-check-1">关</label>$_select[updater_auto_check_off]
				</div>
				<button id="btn-set-updater-auto-check" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_updater_auto_check" value="novalue">设置</button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-update-updater-auto-check" href="#notarget"><i class="fa-solid fa-sharp fa-info-circle"></i></a>
				<span id="info-update-updater-auto-check" class="config-help-info">
					如果在启动期间检测到可用的软件更新，则在播放视图中显示通知标记。
				</span>
			</div>

			<label class="control-label">可用</label>
			<div class="controls">
				<button class="btn btn-medium btn-primary config-btn btn-submit" type="submit" name="checkfor_update" value="novalue">检查</button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-checkfor-update" href="#notarget"><i class="fa-solid fa-sharp fa-info-circle"></i></a>
				$_available_upd
				<span id="info-checkfor-update" class="config-help-info">
					检查是否有可用的软件更新。
				</span>
		    </div>

			<label class="control-label">状态</label>
			<div class="controls">
				<a href="sys-status.php"><button class="btn btn-medium btn-primary config-btn">查看</button></a>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-view-status" href="#notarget"><i class="fa-solid fa-sharp fa-info-circle"></i></a>
				<span id="info-view-status" class="config-help-info">
					查看活动就地更新的进度，或者如果以前应用过更新，则查看更新日志。
				</span>
		    </div>
		</div>

		<div class="control-group">
			<legend>常规</legend>
			<label class="control-label" for="timezone">时区</label>
			<div class="controls">
				<select id="timezone" class="config-select-large" name="timezone">
					$_timezone[timezone]
				</select>
				<button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_time_zone" value="novalue">设置</button>
			</div>

            <label class="control-label" for="hostname">主机/玩家名称</label>
            <div class="controls">
                <input class="config-input-large" type="text" pattern="[A-Za-z0-9\-]{3,63}" id="hostname" name="hostname" value="$_select[hostname]" required>
				<button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_host_name" value="novalue">设置</button>
				<span class="config-help-info">
					长度3-63个字符，允许字母数字和连字符。这是将出现在网络上的名称。
				</span>
            </div>

            <label class="control-label" for="keyboard">键盘布局</label>
            <div class="controls">
                <select id="keyboard" class="config-select-large" name="keyboard">
                    $_keyboard[keyboard]
                </select>
                <button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_keyboard" value="novalue">设置</button>
            </div>

            <label class="control-label" for="browsertitle">浏览器标题</label>
            <div class="controls">
                <input class="config-input-large" type="text" id="browsertitle" name="browsertitle" value="$_select[browsertitle]" required>
				<button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_browser_title" value="novalue">设置</button>
            </div>
		</div>

		<div class="control-group">
			<legend>启动选项</legend>
			<label class="control-label" for="worker-responsiveness">状态响应</label>
			<div class="controls">
				<select id="worker-responsiveness" class="config-select-large" name="worker_responsiveness">
					$_select[worker_responsiveness]
				</select>
				<button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_worker_responsiveness" value="novalue">设置</button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-worker-responsiveness" href="#notarget"><i class="fa-solid fa-sharp fa-info-circle"></i></a>
				<span id="info-worker-responsiveness" class="config-help-info">
					<b>Default:</b> 适用于所有Raspberry Pi型号。<br>
					<b>Boosted:</b> 最适合多核树莓派。当使用配置屏幕或进行其他需要工作守护程序处理的设置更改时，这将提供更快的响应速度。
				</span>
			</div>

			<label class="control-label" for="cpugov">CPU调控器</label>
			<div class="controls">
				<select id="cpugov" class="config-select-large" name="cpugov">
					$_select[cpugov]
				</select>
				<button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_cpugov" value="novalue">设置</button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-cpugov" href="#notarget"><i class="fa-solid fa-sharp fa-info-circle"></i></a>
				<span id="info-cpugov" class="config-help-info">
					<b>On-demand:</b> 根据负载将CPU频率从最低扩展到最高。<br>
					<b>Performance:</b> 以最高频率运行CPU。
				</span>
			</div>

			<label class="control-label" for="usb-auto-mounter">USB自动挂载</label>
			<div class="controls">
				<select id="usb-auto-mounter" class="config-select-large" name="usb_auto_mounter">
					$_select[usb_auto_mounter]
				</select>
				<button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_usb_auto_mounter" value="novalue">设置</button>
				<span class="config-help-static">
					为较旧的ARMv6平台Pi-1B、Pi-Zero和Pi-Zero W选择Devmon
				</span>
			</div>

			<div class="$_usbboot_hide">
				<label class="control-label">USB引导（Pi-3*）</label>
				<div class="controls">
					<a href="#enable-usbboot" data-toggle="modal"><button class="btn btn-primary btn-medium config-btn" $_usbboot_btn_disable>允许</button></a>
					<a aria-label="Help" class="config-info-toggle" data-cmd="info-usb-boot" href="#notarget"><i class="fa-solid fa-sharp fa-info-circle"></i></a>
					<span id="info-usb-boot" class="config-help-info config-help-no-margin">
						对于Pi-3B、3B+和3A+而言，此选项可对OTP内存进行编程，以实现从USB驱动器启动。动态口令更新后，系统可以从uSD卡或USB驱动器启动。
	                </span>
					<span class="config-help-static">
						$_usbboot_msg
					</span>
				</div>
			</div>

			<div class="config-horiz-rule"></div>

			<div class="$_wifibt_hide">
				<label class="control-label">WiFi</label>
				<div class="controls">
					<div class="toggle">
						<label class="toggle-radio toggle-p3wifi" for="toggle-p3wifi-2">开</label>$_select[p3wifi_on]
						<label class="toggle-radio toggle-p3wifi" for="toggle-p3wifi-1">关</label>$_select[p3wifi_off]
					</div>
					<button id="btn-set-p3wifi" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_p3wifi" value="novalue">设置</button>
					<a aria-label="Help" class="config-info-toggle" data-cmd="info-p3wifi" href="#notarget"><i class="fa-solid fa-sharp fa-info-circle"></i></a>
					<span id="info-p3wifi" class="config-help-info">
						集成适配器出现在Pi-4、Pi-3和Pi-Zero W型号上。
                    </span>
				</div>

				<label class="control-label">蓝牙</label>
				<div class="controls">
					<div class="toggle">
						<label class="toggle-radio toggle-p3bt" for="toggle-p3bt-2">开</label>$_select[p3bt_on]
						<label class="toggle-radio toggle-p3bt" for="toggle-p3bt-1">关</label>$_select[p3bt_off]
					</div>
					<button id="btn-set-p3bt" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_p3bt" value="novalue">设置</button>
					<a aria-label="Help" class="config-info-toggle" data-cmd="info-p3bt" href="#notarget"><i class="fa-solid fa-sharp fa-info-circle"></i></a>
					<span id="info-p3bt" class="config-help-info">
						集成适配器出现在Pi-4、Pi-3和Pi-Zero W型号上。
                    </span>
				</div>
			</div>

			<label class="control-label">HDMI端口</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio toggle-hdmiport" for="toggle-hdmiport-2">开</label>$_select[hdmiport_on]
					<label class="toggle-radio toggle-hdmiport" for="toggle-hdmiport-1">关</label>$_select[hdmiport_off]
				</div>
				<button id="btn-set-hdmiport" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_hdmiport" value="novalue">设置</button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-hdmiport" href="#notarget"><i class="fa-solid fa-sharp fa-info-circle"></i></a>
				<span id="info-hdmiport" class="config-help-info">
					保持HDMI端口开启会使用+25毫安的电流并延长启动时间。
                </span>
			</div>

			<label class="control-label">LED0（活跃）</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio toggle-actled" for="toggle-actled-2">开</label>$_select[actled_on]
					<label class="toggle-radio toggle-actled" for="toggle-actled-1">关</label>$_select[actled_off]
				</div>
				<button id="btn-set-actled" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_actled" value="novalue">设置</button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-actled" href="#notarget"><i class="fa-solid fa-sharp fa-info-circle"></i></a>
				<span id="info-actled" class="config-help-info">
					LED0默认触发是SD卡（mmc0）活动。
                </span>
			</div>

			<div class="$_pwrled_hide">
				<label class="control-label">LED1（电源）</label>
				<div class="controls">
					<div class="toggle">
						<label class="toggle-radio toggle-pwrled" for="toggle-pwrled-2">开</label>$_select[pwrled_on]
						<label class="toggle-radio toggle-pwrled" for="toggle-pwrled-1">关</label>$_select[pwrled_off]
					</div>
					<button id="btn-set-pwrled" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_pwrled" value="novalue">设置</button>
					<a aria-label="Help" class="config-info-toggle" data-cmd="info-pwrled" href="#notarget"><i class="fa-solid fa-sharp fa-info-circle"></i></a>
					<span id="info-pwrled" class="config-help-info">
						LED1默认触发器为默认开启电源。
                    </span>
				</div>
			</div>

			<div class="config-horiz-rule"></div>

			<label class="control-label" for="ipaddr-timeout">地址超时</label>
			<div class="controls">
				<select id="ipaddr-timeout" class="config-select-large" name="ipaddr_timeout">
					$_select[ipaddr_timeout]
				</select>
				<button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_ipaddr_timeout" value="novalue">设置</button>
				<span class="config-help-static">
					启动时，等待指定的秒数，以便将IP地址分配给适配器。
					如果WiFi或以太网适配器都没有分配IP地址，将启动AP模式。
				</span>
			</div>

			<label class="control-label">等待以太网</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio toggle-eth0chk" for="toggle-eth0chk-2">开</label>$_select[eth0chk_on]
					<label class="toggle-radio toggle-eth0chk" for="toggle-eth0chk-1">关</label>$_select[eth0chk_off]
				</div>
				<button id="btn-set-eth0chk" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_eth0chk" value="novalue">设置</button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-eth0chk" href="#notarget"><i class="fa-solid fa-sharp fa-info-circle"></i></a>
				<span id="info-eth0chk" class="config-help-info">
					等待最多“地址超时”秒钟，以便将地址分配给以太网适配器。
					如果设置为否，将跳过地址检查，并减少启动时间。
				</span>
			</div>
		</div>

		<div class="control-group">
			<legend>文件共享</legend>
			<p class="sub-legend">
				这些服务使其他主机可以通过网络访问驻留在该主机上的文件。
			</p>

			<label class="control-label">SMB (Samba)</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio toggle-fs-smb" for="toggle-fs-smb-2">开</label>$_select[fs_smb_on]
					<label class="toggle-radio toggle-fs-smb" for="toggle-fs-smb-1">关</label>$_select[fs_smb_off]
				</div>
				<button id="btn-set-fs-smb" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_fs_smb" value="novalue">设置</button>
				<span class="config-help-static">
					Server Message Block (SMB) allows files to be shared over a network with Windows, Mac and Linux clients.<br>
					<b>Shares: </b> NAS, SDCard, Playlists and USB shares are automatically created.<br>
					<b>Access: </b> Specify "anonymous" access or userid = guest and no password when mounting shares.<br>
                </span>
			</div>

			<div class="config-horiz-rule"></div>

			<label class="control-label">NFS</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio toggle-fs-nfs" for="toggle-fs-nfs-2">开</label>$_select[fs_nfs_on]
					<label class="toggle-radio toggle-fs-nfs" for="toggle-fs-nfs-1">关</label>$_select[fs_nfs_off]
				</div>
				<button id="btn-set-fs-nfs" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_fs_nfs" value="novalue">设置</button>
				<span class="config-help-static">
					网络文件共享（NFS）允许通过网络与Linux客户端共享文件。<br>
					<b>输出: </b> 挂载到/media的USB存储设备会自动挂载在/etc/exports中。其他存储位置必须手动添加。<br>
					<b>格式: </b> 仅推荐使用Ext4和fat 32（VFAT）文件系统格式。
				</span>
			</div>

			<label class="control-label" for="fs-nfs-access">访问</label>
			<div class="controls">
				<input id="fs-nfs-access" class="input-large config-input-large" type="text" name="fs_nfs_access" value="$_select[fs_nfs_access]" placeholder="IP地址或子网">
				<button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_fs_nfs_access" value="novalue">设置</button>
				<span class="config-help-static">
					指定允许访问NFS导出的客户端IP或子网地址。<br>
					使用无类别域间路由（CIDR）表示法（/24表示子网，/32表示IP地址）。<br>
					此子网是: <b>$_this_subnet</b>
				</span>
			</div>

			<label class="control-label" for="fs-nfs-options">选项</label>
			<div class="controls">
				<input id="fs-nfs-options" class="input-large config-input-large" type="text" name="fs_nfs_options" value="$_select[fs_nfs_options]" required>
				<button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_fs_nfs_options" value="novalue">设置</button>
				<span class="config-help-static">
					这些选项决定授予连接的客户端的权限。<br>
					默认选项: rw,sync,no_subtree_check,no_root_squash
				</span>
			</div>

			<div class="config-horiz-rule"></div>

			<div class="$_feat_minidlna">
				<label class="control-label">DLNA</label>
				<div class="controls">
					<div class="toggle">
						<label class="toggle-radio toggle-dlnasvc" for="toggle-dlnasvc-2">开</label>$_select[dlnasvc_on]
						<label class="toggle-radio toggle-dlnasvc" for="toggle-dlnasvc-1">关</label>$_select[dlnasvc_off]
					</div>
					<button id="btn-set-dlnasvc" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_dlna_settings" value="novalue">设置</button>
					<span class="config-help-static">
						DLNA媒体服务器将为MPD定义的音乐源编入索引，并使它们可供UPnP控制点使用。
	                </span>
				</div>

				<label class="control-label" for="dlnaname">名称</label>
				<div class="controls">
					<input class="config-input-large" type="text" id="dlnaname" name="dlnaname" value="$_select[dlnaname]" required>
					<button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_dlna_settings" value="novalue">设置</button>
				</div>

				<div class="controls">
					<a data-toggle="modal" href="#rebuild-dlnadb" $_dlna_link_disable><button class="btn btn-medium btn-primary config-btn" $_dlna_btn_disable>重建</button>
					<span class="config-btn-after">DLNA数据库</span>
				</div>

				<div class="controls">
					<a href="http://$_select[hostip]:8200" class="btn btn-medium btn-primary config-btn target-blank-link" target="_blank" $_dlna_link_disable $_dlna_btn_disable>查看</a>
					<span class="config-btn-after">数据库状态</span>
				</div>
			</div>
		</div>

		<div class="control-group">
			<legend>安全</legend>
			<label class="control-label">Web SSH</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio toggle-shellinabox" for="toggle-shellinabox-2">开</label>$_select[shellinabox_on]
					<label class="toggle-radio toggle-shellinabox" for="toggle-shellinabox-1">关</label>$_select[shellinabox_off]
				</div>
				<button id="btn-set-shellinabox" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_shellinabox" value="novalue" $_webssh_set_disable>设置</button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-shellinabox" href="#notarget"><i class="fa-solid fa-sharp fa-info-circle"></i></a>
				<span id="info-shellinabox" class="config-help-info">
					使用Shellinabox的基于Web的安全Shell终端 by Markus Gutschk and Luka Krajger.
                </span>
			</div>
			<div class="controls">
				<a href="http://$_select[hostip]:4200" class="btn btn-medium btn-primary config-btn target-blank-link" target="_blank" $_webssh_link_disable $_webssh_open_disable>打开</a>
				<span class="config-btn-after">SSH终端</span>
			</div>

			<div class="config-horiz-rule"></div>

			<!-- HTTPS mode -->
			<div class="$_feat_https">
				<label class="control-label">HTTPS模式</label>
				<div class="controls">
					<div class="toggle">
						<label class="toggle-radio toggle-nginx-https-only" for="toggle-nginx-https-only-2">开</label>$_select[nginx_https_only_on]
						<label class="toggle-radio toggle-nginx-https-only" for="toggle-nginx-https-only-1">关</label>$_select[nginx_https_only_off]
					</div>
					<button id="btn-set-nginx-https-only" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_nginx_https_only" value="novalue">设置</button>
					<a aria-label="Help" class="config-info-toggle" data-cmd="info-nginx-https-only" href="#notarget"><i class="fa-solid fa-sharp fa-info-circle"></i></a>
					<span id="info-nginx-https-only" class="config-help-info">
						启用此选项可将NGINX web服务器配置为仅接受HTTPS连接。
					</span>
					<span class="config-help-static">
						<b>实验功能: </b> 启用浏览器和moOde之间的安全通信。<br>
						查看 <a href="./setup_https.txt" class="target-blank-link" target="_blank">配置指南</a>
						有关HTTP模式如何工作的信息。
	                </span>
				</div>

				<label class="control-label" for="nginx-cert-type">证书类型</label>
				<div class="controls">
					<select id="nginx-cert-type" class="config-select-large" name="nginx_cert_type">
						$_select[nginx_cert_type]
					</select>
					<button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_nginx_cert_type" value="novalue">设置</button>
					<span class="config-help-static">
						<b>Automatic:</b> 当HTTPS模式打开时，自动生成自签名证书并将其安装到NGINX web服务器中。<br>
					    <b>Manual:</b> 对于此类证书，单击上传，然后单击安装按钮。
					</span>
				</div>

				<!--SAVE:label class="control-label">HSTS policy</label>
				<div class="controls">
					<div class="toggle">
						<label class="toggle-radio toggle-nginx-hsts-policy" for="toggle-nginx-hsts-policy-2">开</label>$_select[nginx_hsts_policy_on]
						<label class="toggle-radio toggle-nginx-hsts-policy" for="toggle-nginx-hsts-policy-1">关</label>$_select[nginx_hsts_policy_off]
					</div>
					<button id="btn-set-nginx-hsts-policy" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_nginx_hsts_policy" value="novalue">设置</button>
					<a aria-label="Help" class="config-info-toggle" data-cmd="info-nginx-hsts-policy" href="#notarget"><i class="fa-solid fa-sharp fa-info-circle"></i></a>
					<span id="info-nginx-hsts-policy" class="config-help-info">
						Turn this ON to configure NGINX web server for HTTP Strict Transport Security (HSTS).
					</span>
					<span class="config-help-static">
						<b>Caution:</b> Turning this ON sets a Browser policy that forces HTTPS even after turning HTTPS mode OFF.
					</span>
				</div-->

				<div class="$_automatic_cert">
					<label class="control-label">证书</label>
					<div class="controls">
						<button id="btn-download-self-signed-cert" class="btn btn-medium btn-primary config-btn" type="submit" name="download_self_signed_cert" value="1">下载</button>
						<div class="config-help-static">
							下载自签名证书以手动导入到客户端的证书存储中。导入证书的具体方法因客户端操作系统而异。
						</div>
					</div>
				</div>

				<div class="$_manual_cert">
					<label class="control-label">证书</label>
					<div class="controls">
						<label for="nginx-cert-files" id="choose-nginx-cert-files" class="btn btn-primary btn-medium config-btn">上传</label>
						<input type="file" id="nginx-cert-files" accept=".crt, .key" multiple name="nginx_cert_files[]" style="display:none" onchange="$('#btn-upload-nginx-cert-files').click();">
						<button id="btn-upload-nginx-cert-files" class="btn btn-medium btn-primary btn-submit" type="submit" name="upload_nginx_cert_files" value="1" style="display:none"></button>
						<a aria-label="Help" class="config-info-toggle" data-cmd="info-nginx-cert-files" href="#notarget"><i class="fa-solid fa-sharp fa-info-circle"></i></a>
						<span id="info-nginx-cert-files" class="config-help-info">
							选择证书.crt和.key文件并上传到NGINX web服务器，以便后续安装。
						</span>
						<div class="config-help-static">
							$_uploaded_cert_files
						</div>
					</div>

					<div class="controls">
						<button class="btn btn-medium btn-primary btn-submit config-btn" type="submit" name="nginx_install_cert" value="1">安装证书</button>
						<span class="config-help-static">
							将之前上传的.crt和.key文件安装到NGINX web服务器中。
						</span>
					</div>
				</div>
			</div>
		</div>

		<div class="control-group">
			<legend>备份/恢复</legend>
			<label class="control-label">备份系统</label>
			<div class="controls">
				<a href="bkp-config.php?action=backup"><button class="btn btn-medium btn-primary config-btn">备份</button></a>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-backup-system" href="#notarget"><i class="fa-solid fa-sharp fa-info-circle"></i></a>
				<span id="info-backup-system" class="config-help-info">
					备份系统配置和首选项、广播电台、播放列表和CamillaDSP配置。
                </span>
			</div>

			<label class="control-label">恢复系统</label>
			<div class="controls">
				<a href="bkp-config.php?action=restore"><button class="btn btn-medium btn-primary config-btn">恢复</button></a>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-restore-system" href="#notarget"><i class="fa-solid fa-sharp fa-info-circle"></i></a>
				<span id="info-restore-system" class="config-help-info">
					恢复系统配置和首选项、广播电台、播放列表和CamillaDSP配置。
                </span>
			</div>
		</div>

		<div class="control-group">
			<legend>Logs</legend>
			<label class="control-label">启动日志</label>
			<div class="controls">
				<button class="btn btn-medium btn-primary config-btn" type="submit" name="download_logs" value="1">下载</button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-download-logs" href="#notarget"><i class="fa-solid fa-sharp fa-info-circle"></i></a>
				<span id="info-download-logs" class="config-help-info">
					下载moOde启动日志:/var/log/moode.log
                </span>
			</div>

			<label class="control-label">系统日志</label>
			<div class="controls">
				<a href="#clear-syslogs" data-toggle="modal"><button class="btn btn-medium btn-primary config-btn">清除</button></a>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-clear-syslogs" href="#notarget"><i class="fa-solid fa-sharp fa-info-circle"></i></a>
				<span id="info-clear-syslogs" class="config-help-info">
					清除各种系统日志文件。注意维护任务会定期清除日志。
                </span>
			</div>

			<label class="control-label">播放历史日志</label>
			<div class="controls">
				<a href="#clear-playbackhist" data-toggle="modal"><button class="btn btn-medium btn-primary config-btn">清除</button></a>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-clear-playhistory" href="#notarget"><i class="fa-solid fa-sharp fa-info-circle"></i></a>
				<span id="info-clear-playhistory" class="config-help-info">
					清除播放历史日志。请定期执行此任务，因为日志会随着时间的推移而增长。
                </span>
			</div>

			<div class="config-horiz-rule"></div>

			<label class="control-label">减少日志记录</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio toggle-reduce-sys-logging" for="toggle-reduce-sys-logging-2">开</label>$_select[reduce_sys_logging_on]
					<label class="toggle-radio toggle-reduce-sys-logging" for="toggle-reduce-sys-logging-1">关</label>$_select[reduce_sys_logging_off]
				</div>
				<button id="btn-set-reduce-sys-logging" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_reduce_sys_logging" value="novalue">设置</button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-reduce-sys-logging" href="#notarget"><i class="fa-solid fa-sharp fa-info-circle"></i></a>
				<span id="info-reduce-sys-logging" class="config-help-info">
					通过禁用rsyslog服务减少生成的系统日志数据量。
                </span>
			</div>

			<label class="control-label">调试日志记录</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio toggle-debuglog" for="toggle-debuglog-2">开</label>$_select[debuglog_on]
					<label class="toggle-radio toggle-debuglog" for="toggle-debuglog-1">关</label>$_select[debuglog_off]
				</div>
				<button id="btn-set-debuglog" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_debuglog" value="novalue">设置</button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-debuglog" href="#notarget"><i class="fa-solid fa-sharp fa-info-circle"></i></a>
				<span id="info-debuglog" class="config-help-info">
					<b>Log files:</b><br>
					<table class="cdsp-help-table">
						<tr><td>Startup and Jobs</td><td>/var/log/moode.log</td></tr>
						<tr><td>Mount monitor</td><td>/var/log/moode_mountmon.log</td></tr>
						<tr><td>System updater</td><td>/var/log/moode_autocfg.log</td></tr>
						<tr><td>Auto-config</td><td>/var/log/moode_update.log</td></tr>
						<tr><td>Spotify</td><td>/var/log/moode_librespot.log</td></tr>
						<tr><td>AirPlay</td><td>/var/log/moode_shairport-sync.log</td></tr>
						<tr><td>Squeezelite event</td><td>/var/log/moode_slpower.log</td></tr>
						<tr><td>Spotify event</td><td>/var/log/moode_spotevent.log</td></tr>
						<tr><td>AirPlay event</td><td>/var/log/moode_spsevent.log</td></tr>
						<tr><td>Play history</td><td>/var/log/moode_playhistory.log</td></tr>
						<tr><td>WebUI Javascript</td><td>Browser console</td></tr>
					</table>
                </span>
				<span class="config-help-static">
					<b>注意：</b> 仅在对问题进行故障排除时启用此选项。它可能会创建大型日志文件并降低性能。
				</span>
			</div>
		</div>
	</form>
</div>
</div>

<form class="form-horizontal" method="post">
	<div id="view-pkgcontent" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="view-pkgcontent-label" aria-hidden="true">
		<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
			<h3 id="view-pkgcontent-label">包内容</h3>
		</div>
		<div class="modal-body">
			$_pkg_description
			$_pkg_relnotes
		</div>
		<div class="modal-footer">
			<button class="btn singleton" data-dismiss="modal" aria-hidden="true">关闭</button>
		</div>
	</div>
</form>

<form class="form-horizontal" method="post">
	<div id="enable-usbboot" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="enable-usbboot-label" aria-hidden="true">
		<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
			<h3>启用USB启动？</h3>
		</div>
		<div class="modal-body"></div>
		<div class="modal-footer">
			<button class="btn" data-dismiss="modal" aria-hidden="true">取消</button>
			<button class="btn btn-primary btn-submit" type="submit" name="update_usbboot" value="novalue">是</button>
		</div>
	</div>
</form>

<form class="form-horizontal" method="post">
	<div id="restart-localui" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="restart-localui-label" aria-hidden="true">
		<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
			<h3>重新启动本地UI？</h3>
		</div>
		<div class="modal-body"></div>
		<div class="modal-footer">
			<button class="btn" data-dismiss="modal" aria-hidden="true">取消</button>
			<button class="btn btn-primary btn-submit" type="submit" name="update_restart_localui" value="novalue">是</button>
		</div>
	</div>
</form>

<form class="form-horizontal" method="post">
	<div id="clear-playbackhist" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="clear-playbackhist-label" aria-hidden="true">
		<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
			<h3>清除播放历史记录？</h3>
		</div>
		<div class="modal-body"></div>
		<div class="modal-footer">
			<button class="btn" data-dismiss="modal" aria-hidden="true">取消</button>
			<button class="btn btn-primary btn-submit" type="submit" name="update_clear_playhistory" value="novalue">是</button>
		</div>
	</div>
</form>

<form class="form-horizontal" method="post">
	<div id="clear-syslogs" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="clear-syslogs-label" aria-hidden="true">
		<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
			<h3>清除系统日志？</h3>
		</div>
		<div class="modal-body"></div>
		<div class="modal-footer">
			<button class="btn" data-dismiss="modal" aria-hidden="true">取消</button>
			<button class="btn btn-primary btn-submit" type="submit" name="update_clear_syslogs" value="novalue">是</button>
		</div>
	</div>
</form>
